package auxiliary;

/**
 * @author vladimir && alon
 *
 *	Help Functions
 */
public class AuxiliaryClass {

	/**
	 * Check if the input is parsable to int
	 * @param input
	 * @return isNumber
 	 */
	public static boolean isNumber(String input)
	{
		boolean isNumber = true;
		
		try
		{
			Integer.parseInt(input);

		}
		//case not integer
		catch(NumberFormatException e)
		{
			isNumber = false;
		}
		
		return isNumber;
	}
	
	/**
	 * Check if the input is parsable to Double
	 * @param input
	 * @return isDouble
 	 */
	public static boolean isDouble(String input)
	{
		boolean isDouble = true;
		
		try
		{
			Double.parseDouble(input);
		}
		//case not Double
		catch(NumberFormatException e)
		{
			isDouble = false;
		}
		
		return isDouble;
	}
	
}
